<?php defined('IN_PHPCMS') or exit('Access Denied'); ?><?php include template('yp', 'header'); ?>
<div id="main">
  <div id="right">
    <div id="position"><strong>当前位置：</strong><a href="yp/">企业黄页</a><a href="yp/product.php">产品</a>搜索结果</div>
    <div class="bk_10"></div>
    <div class="gsxx_1">
      <span class="gsjs">产品信息</span>
      <span class="zczj">单价（元）</span>
      <span class="area">所在地</span>
    </div>
    <div class="clear"></div>
    <div id="show_0">
<?php $ARRAY = get("SELECT * FROM `phpcms_yp_product` `p` , `phpcms_member_company` `c` WHERE  p.status = 99 AND $where ORDER BY p.inputtime DESC", 20, $page, "", "", "$M[url]product.php?action=searchlist&catid=$catid&areaname=$areaname&lprice=$lprice&hprice=$hprice&q=$q|$M[url]product.php?action=searchlist&catid=$catid&areaname=$areaname&lprice=$lprice&hprice=$hprice&q=$q&page=\$page","","0");$DATA=$ARRAY['data'];$total=$ARRAY['total'];$count=$ARRAY['count'];$pages=$ARRAY['pages'];unset($ARRAY);foreach($DATA AS $n=>$r){$n++;?>
<dl class="list_1 list_2">
      <dt><strong><a href="<?php echo show_url('product',$r[id]);?>"><?php echo $r['title'];?></a> <span class="time"><?php echo date('Y-m-d H:i',$r[inputtime]);?></span></strong><span class="zczj"><?php if($r['price']) { ?><?php echo $r['price'];?>元<a href="company_url($r['userid'],$r[sitedomain])/category-guestbook/label-product/id-<?php echo $r['id'];?>.html"><?php } ?></span><span class="area">[<?php echo $r['areaname'];?>]</span></dt>
      <dd class="pic"><a href="<?php echo show_url('product',$r[id]);?>"><img src="<?php echo thumb($r[thumb],126,80);?>" alt="产品图片" width="120" height="80"/></a></dd>
      <dd><strong>产品简介：</strong><?php echo str_cut(strip_tags($r[content]),100,'..');?></dd>
      <dd><strong>生产商：</strong><a href="<?php echo company_url($r[userid]);?>"><?php echo $r['companyname'];?></a></dd>
    </dl>
<?php } unset($DATA); ?>
   </div>
   <div id="pages"><?php echo $pages;?></div>
  </div>
  <div id="left">
    <div class="box_t">
      <h3>产品库大类列表</h3>
    </div>
    <div class="box_c">
      <ul class="text_list w_100">
  <?php $DATA = get("SELECT catname,catid FROM `phpcms_category` WHERE module = 'yp' AND parentid = '0' ORDER BY listorder ASC", 0, 0, "", "");foreach($DATA AS $n => $r) { $n++;?>
<li><a href="<?php echo list_url('product',$r[catid]);?>"><?php echo $r['catname'];?></a></li>
  <?php } unset($DATA); ?>
      </ul>
      <div class="clear"></div>
    </div>
    <div class="box_b"></div>
    <div class="bk_10"></div>
    <div class="box_t">
      <h3>浏览过的产品</h3>
    </div>
    <div class="box_c">
      <ul class="pic_list_1">
  <?php if($prowhere) { ?>
  <?php $DATA = get("SELECT id,title,thumb FROM `phpcms_yp_product` WHERE id IN ($prowhere) AND status = 99 ORDER BY FIND_IN_SET(id,'$prowhere')", 10, 0, "", "");foreach($DATA AS $n => $r) { $n++;?>
  <li><a href="<?php echo show_url('product',$r[id]);?>"><img src="<?php echo thumb($r['thumb'],48,48);?>" alt="" width="48" height="48"/></a><a href="<?php echo show_url('product',$r[id]);?>" title="<?php echo $r['title'];?>"><?php echo $r['title'];?></a></li>
  <?php } unset($DATA); ?>
  <?php } else { ?>
  <li>您还没有浏览过任何商品</li>
  <?php } ?>
      </ul>
      <div class="clear"></div>
    </div>
    <div class="box_b"></div>
    <div class="bk_10"></div>
    <div class="box_t">
      <h3>最新产品</h3>
    </div>
    <div class="box_c">
      <ul class="pic_list">
        <?php $DATA = get("SELECT p.id,p.title,p.thumb,c.companyname,p.userid FROM `phpcms_yp_product` `p`,`phpcms_member_company` `c` WHERE c.userid = p.userid AND p.status = 99 ORDER BY id DESC", 10, 0, "", "");foreach($DATA AS $n => $r) { $n++;?>
<li>
<img src="<?php echo thumb($r['thumb'],48,48,1,'images/no_pic_50_50.gif');?>" alt="" width="48" height="48"/>
<a href="<?php echo show_url('product',$r[id]);?>" title="<?php echo $r['title'];?>"><strong><?php echo str_cut($r['title'],20,'');?></strong></a>
<span><a href="<?php echo company_url($r['userid']);?>" title="<?php echo $r['companyname'];?>"><?php echo $r['companyname'];?></a></span>
</li>
<?php } unset($DATA); ?>
      </ul>
    </div>
    <div class="box_b"></div>
    <div class="bk_10"></div>
    <div class="box_t">
      <h3>推荐产品</h3>
    </div>
    <div class="box_c">
      <ul class="pic_list">
        <?php $DATA = get("SELECT p.id,p.title,p.thumb,c.companyname,p.userid FROM `phpcms_yp_product` `p`,`phpcms_member_company` `c` WHERE c.userid = p.userid AND p.elite = 1 AND p.status = 99 ORDER BY id DESC", 10, 0, "", "");foreach($DATA AS $n => $r) { $n++;?>
<li><img src="<?php echo thumb($r['thumb'],48,48);?>" alt="" width="48" height="48"/><a href="<?php echo show_url('product',$r[id]);?>"><strong><?php echo str_cut($r['title'],20,'');?></strong></a><a href="<?php echo company_url($r['userid']);?>"><span><?php echo $r['companyname'];?></span></a></li>
<?php } unset($DATA); ?>
      </ul>
    </div>
    <div class="box_b"></div>
  </div>
</div>
<SCRIPT LANGUAGE="JavaScript">
<!--
function my_submit(form)
{
form.submit();
}
//-->
</SCRIPT>
<?php include template('yp', 'footer'); ?>